package com.zjgsu.demo.nodeEntity;


import com.fasterxml.jackson.annotation.JsonProperty;
import org.neo4j.ogm.annotation.GraphId;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;


import java.util.HashSet;
import java.util.List;
import java.util.Set;

@NodeEntity(label="device")
public class Device {
    @GraphId
    private Long id;
    private String url;
    private String image;
    private String openTypeList;
    private String baseInfoKeyList;
    private String baseInfoValueList;
    private String title;
    private String detail;
    @Relationship(type = "拥有")
    @JsonProperty("拥有")
    private List<Device> deviceList;


    public void addDeviceToDeviceList(Device device){
        this.deviceList.add(device);
    }
    public List<Device> getDeviceList() {
        return deviceList;
    }

    public void setDeviceList(List<Device> deviceList) {
        this.deviceList = deviceList;
    }

    public String getBaseInfoValueList() {
        return baseInfoValueList;
    }

    public void setBaseInfoValueList(String baseInfoValueList) {
        this.baseInfoValueList = baseInfoValueList;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getOpenTypeList() {
        return openTypeList;
    }

    public void setOpenTypeList(String openTypeList) {
        this.openTypeList = openTypeList;
    }

    public String getBaseInfoKeyList() {
        return baseInfoKeyList;
    }

    public void setBaseInfoKeyList(String baseInfoKeyList) {
        this.baseInfoKeyList = baseInfoKeyList;
    }

    @Override
    public String toString() {
        return "Device{" +
                "id=" + id +
                ", url='" + url + '\'' +
                ", image='" + image + '\'' +
                ", openTypeList='" + openTypeList + '\'' +
                ", baseInfoKeyList='" + baseInfoKeyList + '\'' +
                ", baseInfoValueList='" + baseInfoValueList + '\'' +
                ", title='" + title + '\'' +
                ", detail='" + detail + '\'' +
                '}';
    }
}
